package com.wowangz.cms.common.utils;

import java.util.ArrayList;

/*
 * 用于登录在线的sessionID
 */
public class SessionIDUtils {
	
	private static ArrayList<String> sessionIDList = new ArrayList<String>();
	
	public static void add(String sessionId){
		sessionIDList.add(sessionId);
	}
	
	public static void remove(String sessionId){
		sessionIDList.remove(sessionId);
	}
	
	public static boolean isExist(String sessionId){
		boolean bool = false;
		for(String value : sessionIDList){
			if(value.equals(sessionId)){
				bool = true;
			}
		}
		return bool;
	}
	
	public static void clear(){
		sessionIDList.clear();
	}

}
